#!/bin/bash

if ["$1" = ""]
then
	echo "build.sh: Please specify either 'macosx' or 'linux' as the first argument."
	exit 1;
fi

rm -rf lua-5.1.3
tar -xzf lua-5.1.3.tar.gz
cd ./lua-5.1.3 && make $1
cd .. && ./premake_update.sh $1
make all

